package com.gu.mapper;

import com.gu.entity.PropertyDO;
import java.util.List;
import org.apache.ibatis.annotations.Param;

/**
 * 由于需要对分页支持,请直接使用对应的DAO类
 * The Table gu_property.
 * 物业表
 */
public interface PropertyMapper{

    /**
     * desc:插入表:gu_property.<br/>
     * descSql =  SELECT LAST_INSERT_ID() <![CDATA[ INSERT INTO gu_property( ID ,REPAIR_STATUS ,REPAIR_DESCRIBE ,REPAIR_PICTURE_PATH ,OWNER_ID ,REPAIR_TYPE ,CREATE_TIME ,UPDATE_TIME )VALUES( null , #{repairStatus,jdbcType=VARCHAR} , #{repairDescribe,jdbcType=VARCHAR} , #{repairPicturePath,jdbcType=VARCHAR} , #{ownerId,jdbcType=INTEGER} , #{repairType,jdbcType=INTEGER} , #{createTime,jdbcType=DATE} , #{updateTime,jdbcType=DATE} ) ]]>
     * @param entity entity
     * @return Integer
     */
    Integer insert(PropertyDO entity);
    /**
     * desc:批量插入表:gu_property.<br/>
     * descSql =  INSERT INTO gu_property( ID ,REPAIR_STATUS ,REPAIR_DESCRIBE ,REPAIR_PICTURE_PATH ,OWNER_ID ,REPAIR_TYPE ,CREATE_TIME ,UPDATE_TIME )VALUES ( null , #{item.repairStatus,jdbcType=VARCHAR} , #{item.repairDescribe,jdbcType=VARCHAR} , #{item.repairPicturePath,jdbcType=VARCHAR} , #{item.ownerId,jdbcType=INTEGER} , #{item.repairType,jdbcType=INTEGER} , #{item.createTime,jdbcType=DATE} , #{item.updateTime,jdbcType=DATE} ) 
     * @param list list
     * @return Integer
     */
    Integer insertBatch(List<PropertyDO> list);
    /**
     * desc:根据主键删除数据:gu_property.<br/>
     * descSql =  <![CDATA[ DELETE FROM gu_property WHERE ID = #{id,jdbcType=INTEGER} ]]>
     * @param id id
     * @return Integer
     */
    Integer deleteById(Integer id);
    /**
     * desc:根据主键获取数据:gu_property.<br/>
     * descSql =  SELECT * FROM gu_property WHERE <![CDATA[ ID = #{id,jdbcType=INTEGER} ]]>
     * @param id id
     * @return PropertyDO
     */
    PropertyDO getById(Integer id);


    List<PropertyDO> propertyList(@Param("selectUserParam") String selectUserParam,@Param("id") Integer id,@Param("repairStatus") Integer repairStatus);

    List<PropertyDO> propertyListNew(@Param("repairStatus") Integer repairStatus);

    List<PropertyDO> propertyListByUserId(@Param("ownerId") Integer ownerId,@Param("repairStatus") Integer repairStatus);

    int updateRepairStatus(PropertyDO propertyDO);

    /**
     * 批量删除
     * @param ids
     * @return
     */
    Integer deleteByIds(@Param("ids") Integer[] ids);
}
